package org.example.thread.testStatus;

/**
 * @author liyishan
 * @date 2023/8/2 14:45
 * @apiNote   测试线程状态
 */

public class TestStatus {
    public static void main(String[] args) {
        // 线程 sleep 200秒    --->TIMED_WAITING
        new Thread(new WaitingTime(),"WaitingTimeThread").start();
        //给自己加锁且wait       --->  WAITING
        new Thread(new WaitingState(),"WaitingState").start();
        // 给自己加锁且线程 sleep 200秒     --->  TIMED_WAITING
        new Thread(new BlockedThread(),"BlockedThread-01").start();
        // 给自己加锁且线程 sleep 200秒     ---> BLOCKED
        new Thread(new BlockedThread(),"BlockedThread-02").start();

    }
}
